Change the ansi support detection to return true for Windows 10+#49571
Open
plumstone wants to merge 1 commit intospring-projects:mainfrom
Open
Change the ansi support detection to return true for Windows 10+#49571plumstone wants to merge 1 commit intospring-projects:mainfrom
plumstone wants to merge 1 commit intospring-projects:mainfrom
Conversation
Signed-off-by: Philemon Hilscher <philemon847@gmail.com>
56d6be5 to
4e6a7d3
Compare
Member
|
We've had a similar request in the past and found ANSI support in Windows quite hard to get working consistently. See #34835 (comment) for some previous analysis. If we do consider this again, I think it should be for Windows 11+ only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhancement proposal
Windows supports console ANSI output since build 10586 (End of 2015). Therefore I thought it would make sense to update the ANSI support detection in Spring Boot.
The only slight issue I noticed is that the JDK does not return the build number for Windows systems which in result cannot be checked. https://github.com/openjdk/jdk/blob/master/src/java.base/windows/native/libjava/java_props_md.c#L502
So with this change only the earliest versions of Windows 10 until 2016 (which are no longer supported anyway) would give out a wrong result whether they support ANSI.
Now I need your feedback. Is this acceptable? Should I add more test cases?
Thanks in advance. :)